import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

public class Test {

    public static void main2(String[] args) {
        Queue<Integer> queue=new LinkedList<>();
        queue.offer(1);//尾插法
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);

        System.out.println(queue.poll());//1//头删
        System.out.println(queue.peek());//2
        System.out.println(queue.peek());//3
        System.out.println(queue.isEmpty());
    }
    public static void main1(String[] args) {
        LinkedList<Integer> stack=new LinkedList<>();
        stack.push(10);//list接口没有实现push方法,linkedList是有的
        stack.push(20);
        stack.push(30);
        stack.push(40);
    }
}
